home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (April 1991)
/
HAMCALL CD-ROM (Buckmaster)(April 1991).BIN
/
bcast
/
fccrf
/
antswrpc.asc
< prev
next >
Wrap
Text File
|
1990-10-14
|
7KB
|
149 lines
10 GOSUB 950
20 CLS:PRINT CHR$(23):PRINT"WOULD YOU LIKE A":PRINT"DESCRIPTION OF THE PROGRAM":PRINT" ( Y OR N )"
30 I$=INKEY$:IF I$="" THEN 30
40 IF I$="Y" THEN 70
50 IF I$<>"N" THEN 20
60 GOTO 80
70 GOSUB 1050
80 CLS:PRINT CHR$(23):PRINT"WHICH DO YOU WISH?":PRINT:PRINT"1--ANTENNA DESIGN CALCULATIONS"
90 PRINT:PRINT"2-VSWR CALCULATIONS":PRINT:PRINT"3-TERMINATE FUNCTION":PRINT:PRINT"INPUT CHOICE --->";
100 I$=INKEY$:IF I$="" THEN 100
110 IF I$="3" THEN END
120 U=VAL(I$)
130 IF U>2 OR U<1 THEN 80:ELSE CLS:ON U GOTO 590,140
140 CLS:PRINT"----VOLTAGE STANDING WAVE RATIO CALCULATIONS--"
150 PRINT:PRINT"FOLLOWING OPTIONS ARE AVAILABLE:"
160 PRINT"1) INPUT FORWARD POWER & REFLECTED POWER, CALCULATE VSWR"
170 PRINT"2) INPUT FORWARD PWR & VSWR, CALCULATE REFLECTED POWER"
180 PRINT"3) INPUT VSWR, CALCULATE % REFLECTED POWER"
190 PRINT"4) INPUT FORWARD POWER, VSWR, TRANSMISSION LINE IMPEDANCE"
200 PRINT"CALCULATE MAX. VOLTAGE AND CURRENT ON TRANSMISSION LINE"
210 PRINT"5) RESTART PROGRAM":PRINT
220 PRINT"INPUT CHOICE --->"
230 I$=INKEY$:IF I$="" THEN 230
240 D=VAL(I$)
250 IF D<1 OR D>5 THEN 140:ELSE ON D GOTO 260,340,390,420,80
260 CLS:INPUT"ENTER -->FORWARD POWER";A:IF A<=0 THEN 260:ELSE INPUT"ENTER -->REFLECTED POWER";B:IF B<0 THEN 260:ELSE CLS
270 IF B>A THEN PRINT"ERROR...REFLECTED POWER CANNOT EXCEED FORWARD POWER":FOR X=1 TO 1000:NEXT X:GOTO 260
280 X=B/A:IF ABS(1-X)<.0001 THEN S=999999!:GOTO 310
290 Y=SQR(X):S=(1+Y)/(1-Y)
300 IF S<326 THEN S=INT(S*100+.5)/100
310 PRINT"FORWARD POWER -";A;" WATTS";
320 PRINT"REFLECTED POWER -";B;" WATTS";
330 PRINT"VSWR =";S;"/1":GOSUB 930:K=0:GOTO 510
340 CLS:INPUT"ENTER -->FORWARD POWER";A:IF A<0 THEN 340
350 INPUT"ENTER --VSWR";S:IF S<1 THEN PRINT"VSWR CANNOT BE LESS THAN 1, PLEASE ENTER AGAIN":GOTO 350:ELSE Y=(S-1)/(S+1)
360 B=A*Y*Y:CLS:B=INT(B*10+.5)/10
370 PRINT"FORWARD POWER ";A;"WATTS";:PRINT "VSWR ";S;"/1"
380 PRINT"REFLECTED POWER =";B;" WATTS":GOSUB 930:K=0:GOTO 510
390 CLS:INPUT"ENTER -->VSWR";S:IF S<1 THEN PRINT"VSWR MUST BE GREATER THAN 1"FOR N1=1 TO 1000:NEXT:GOTO 390:ELSE Y=(S-1)/(S+1):C=INT(Y*Y*10000+.5)/100
400 CLS:PRINT"VSWR =";S;"/1":PRINT"REFLECTED POWER =";C;"%"
410 PRINT"REFLECTED POWER =";C;"%":GOSUB 930:K=0:GOTO 510
420 CLS:INPUT"ENTER --FORWARD POWER";A:IF A<=0 THEN PRINT"FORWARD POWER MUST BE POSITIVE":FOR N1=1 TO 1000:NEXT:GOTO 420
430 INPUT"ENTER -->VSWR";S:IF S<1 THEN PRINT"VSWR MUST BE GREATER THAN 1":GOTO 430
440 INPUT"ENTER -->TRANS. LINE IMPEDANCE";G:IF G<=0 THEN PRINT"IMPEDANCE MUST BE POSITIVE":GOTO 440
450 E=SQR(A*S*G):E=INT(E*100+.5)/100
460 I=INT(E/G*100+.5)/100:CLS
470 PRINT"FORWARD POWER =";A;"WATTS":PRINT"VSWR =";S;"/1"
480 PRINT"LINE IMPEDANCE =";G;"OHMS"
490 PRINT"MAX. LINE VOLTAGE =";E;"VOLTS"
500 PRINT"MAX. LINE CURRENT =";I;"AMPERES"
510 PRINT"CONTINUE IN THIS MODE (Y OR N)"
520 T$=INKEY$:IF T$="" THEN 520
530 CLS
540 IF LEFT$(T$,1)<>"Y" AND LEFT$(T$,1)<>"N" THEN 510
550 IF LEFT$(T$,1)="N" AND K=0 THEN 150
560 IF LEFT$(T$,1)="N" AND K=1 THEN CLS:GOTO 600
570 IF LEFT$(T$,1)="Y" AND K=1 THEN 680
580 IF LEFT$(T$,1)="Y" AND K=0 THEN ON D GOTO 260,340,390,420
590 CLS:PRINT" -- ANTENNA LENGTH CALCULATIONS --"
600 PRINT"FOLLOWING OPTIONS ARE AVAILABLE:"
610 PRINT:PRINT"1 -- HALF WAVE DIPOLE":PRINT:PRINT"2 -- QUARTER WAVE VERTICAL"
620 PRINT:PRINT"3 -- 3/4 WAVELENGTH VERTICAL"
630 PRINT:PRINT"4 -- 5/8 WAVELENGTH VERTICAL":PRINT:PRINT"5 -- RESTART PROGRAM"
640 U=0:PRINT"INPUT CHOICE -->"
650 I$=INKEY$:IF I$="" THEN 650
660 U=VAL(I$)
670 IF U>5 OR U<1 THEN 590
680 CLS:IF U=5 THEN 80
690 IF U=1 THEN N=468
700 IF U=2 THEN N =234
710 IF U=3 THEN N=702
720 IF U=4 THEN N=585
730 F=0:PRINT:INPUT"ENTER DESIRED RESONANT FREQUENCY (F) IN MHZ--> ";F:CLS
740 IF F<.022 THEN PRINT"FREQUENCY TOO LOW":K=1:GOTO 510
750 IF F>1000 THEN PRINT"FREQUENCY TOO HIGH":K=1:GOTO 510
760 L=N/F:P=N/(L*L):P=P*1000
770 I=L-INT(L):G=INT(L):I=I*12:I=INT(I*100+.5)/100
780 M=L*.3048:M=INT(M*10000+.5)/10000:PRINT"RESONANT FREQUENCY =";F;"MHZ"
790 PRINT"LENGTH =";G;"FT";I;"IN.":PRINT M;"METERS"
800 L=L/2:I=L-INT(L):I=I*12:I=INT(I*100+.5)/100:G=INT(L):M=L*.3048:M=INT(M*10000+.5)/10000
810 IF U<>1 THEN 830
820 PRINT"HALF LENGTH =";G;"FT.";I;"IN.":PRINT M;"METERS"
830 IF U=1 THEN A$="1/2 WAVE DIPOLE"
840 IF U=2 THEN A$="1/4 WAVE VERT"
850 IF U=3 THEN A$="3/4 WAVE VERT"
860 IF U=4 THEN A$="5/8 WAVE VERT"
870 PRINT"RESONANT FREQUENCY WILL CHANGE ";INT(P/12*100+.5)/100;"KHZ PER INCH"
880 PRINT A$
890 PRINT"SHORTENING WILL RAISE RESONANT FREQUENCY";
900 PRINT" LENGTHENING WILL LOWER IT";
910 'FORX=0TO127:SET(X,0):SET(X,29):NEXTX:FORY=1TO28:SET(0,Y):SET(127,Y):NEXTY
920 GOTO 510
930 'FOR X=22TO105:SET(X,2):SET(X,15):NEXTX:FORY=2TO15:SET(22,Y):SET(105,Y):NEXTY
940 RETURN
950 REM INSTRUCTIONS
960 H$=STRING$(32,"I")
970 CLS:PRINT CHR$(23):PRINT H$;:PRINT:PRINT:PRINT:PRINT TAB(9);"ANTENNA DESIGN":PRINT
980 PRINT TAB(14);"AND":PRINT
990 PRINT TAB(6);"VOLTAGE STANDING WAVE":PRINT
1000 PRINT TAB(10);"CALCULATIONS"
1010 FOR X=31 TO 448 STEP 32:PRINT"I";:NEXT X
1020 FOR X=32 TO 479 STEP 32:PRINT"I";:NEXT X
1030 PRINT H$;
1040 FOR X=1 TO 2000:NEXT:RETURN
1050 CLS:PRINT CHR$(23)
1060 PRINT TAB(3)" --- ANTENNA DESIGN ---":PRINT:PRINT
1070 PRINT"ANTENNA DESIGN IS A PROGRAM"
1080 PRINT"TO DESIGN ANTENNAS THAT ARE"
1090 PRINT"RESONANT AT A GIVEN FREQUENCY.
1100 PRINT:PRINT"THE ANTENNAS INCLUDED ARE :"
1110 PRINT" 1 -- HALF WAVE DIPOLE"
1120 PRINT" 2 -- QUARTER WAVE VERTICAL"
1130 PRINT" 3 -- 3/4 WAVE VERTICAL"
1140 PRINT" 4 -- 5/8 WAVE VERTICAL"
1150 PRINT:PRINT"PRESS ENTER TO CONTINUE":INPUT I$
1160 CLS:PRINT CHR$(23)
1170 PRINT" THE PROGRAM FINDS THE LENGTH"
1180 PRINT"OF THE ANTENNA AND PREDICTS HOW"
1190 PRINT"MUCH THE RESONANT FREQUENCY"
1200 PRINT"WILL CHANGE PER INCH CHANGE IN"
1210 PRINT"ANTENNA LENGTH."
1220 PRINT:INPUT"PRESS ENTER TO CONTINUE";I$:CLS:PRINT CHR$(23)
1230 PRINT" --- VOLTAGE STANDING WAVE ---"
1240 PRINT TAB(10);"CALCULATIONS":PRINT
1250 PRINT" VOLTAGE STANDING WAVE RATIO"
1260 PRINT"IS USED IN TUNING AN ANTENNA OR"
1270 PRINT"IN ANALYZING THE PERFORMANCE"
1280 PRINT"OF AN ANTENNA ALONG WITH IT'S"
1290 PRINT"TRANSMISSION LINE."
1300 PRINT:INPUT"PRESS ENTER TO CONTINUE";I$
1310 CLS:PRINT CHR$(23)
1320 PRINT" IT FINDS THE VSWR FROM THE"
1330 PRINT"FORWARD POWER AND THE REFLECTED"
1340 PRINT"POWER, IT FINDS THE REFLECTED"
1350 PRINT"POWER FROM THE FORWARD POWER AND"
1360 PRINT"THE VSWR, AND IT CALCULATES THE"
1370 PRINT"PERCENTAGE OF REFLECTED POWER"
1380 PRINT"FOR A SPECIFIED VSWR.":PRINT
1390 PRINT" THE PROGRAM ALSO FINDS THE"
1400 PRINT"MAXIMUM VOLTAGE AND MAXIMUM"
1410 PRINT"CURRENT ON THE TRANSMISSION"
1420 PRINT"LINE FEEDING THE ANTENNA.":PRINT
1430 INPUT"PRESS ENTER TO CONTINUE";I$
1440 RETURN
2000 REM FROM AVSYNC/TBS BBS BY
2010 REM PERMISSION . CALL
2020 REM 404/320-6202
2030 REM BILL TULLIS IS SYSOP